-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort by label keys before generating labels key and value lists #3698
Sort by label keys before generating labels key and value lists #3698
Conversation
Can you please add a test case? |
exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a changelog entry and a test for this.
@soundofspace this PR needs a test case, marking it as a draft until it has been added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given it's a trivial change and still an improvement compared to the actual code for some use cases LGTM
exporter/opentelemetry-exporter-prometheus/tests/test_prometheus_exporter.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please fix failing build.
@lzchen not really sure why that build is failing because of this pr, seems like something unrelated to this, and not really sure how to fix it. |
Probably we just need to update the contrib test SHA, no worries, I have done so. |
Description
Fixes bug where labels are wrongfully assigned to values because their order changed in input dictionary.
Fixes part of #3391. This does not fix missing labels, it only fixes the issue of labels being wrongfully assigned even if all labels are present (also empty string label values).
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Test metric:
Before:
After:
Does This PR Require a Contrib Repo Change?
Checklist: